\hypertarget{gzip_8c}{
\section{gzip.c File Reference}
\label{gzip_8c}\index{gzip.c@{gzip.c}}
}
{\ttfamily \#include $<$stdio.h$>$}\par
{\ttfamily \#include $<$stdlib.h$>$}\par
{\ttfamily \#include $<$string.h$>$}\par
{\ttfamily \#include $<$assert.h$>$}\par
{\ttfamily \#include $<$unistd.h$>$}\par
{\ttfamily \#include $<$zlib.h$>$}\par
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{gzip_8c_a714fe40d73494a577de3127a79ea24a2}{SET\_\-BINARY\_\-MODE}(file)
\item 
\#define \hyperlink{gzip_8c_a25022864dfc8ec428e7128282e57b136}{CHUNK}~16384
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{gzip_8c_a88155dd6154eb1d1c59ed7809f2a0795}{gzip\_\-default} (int argcounter, char $\ast$$\ast$argvector)
\begin{DoxyCompactList}\small\item\em function executed to archive a file \item\end{DoxyCompactList}\item 
int \hyperlink{gzip_8c_a3c04138a5bfe5d72780bb7e82a18e627}{main} (int argc, char $\ast$$\ast$argv)
\begin{DoxyCompactList}\small\item\em command main function \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Patricia Minica, anul 2 Informatica -\/ Engleza 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
1.0
\end{DoxyVersion}
archives a file passes with calling function argument 

\subsection{Define Documentation}
\hypertarget{gzip_8c_a25022864dfc8ec428e7128282e57b136}{
\index{gzip.c@{gzip.c}!CHUNK@{CHUNK}}
\index{CHUNK@{CHUNK}!gzip.c@{gzip.c}}
\subsubsection[{CHUNK}]{\setlength{\rightskip}{0pt plus 5cm}\#define CHUNK~16384}}
\label{gzip_8c_a25022864dfc8ec428e7128282e57b136}
\hypertarget{gzip_8c_a714fe40d73494a577de3127a79ea24a2}{
\index{gzip.c@{gzip.c}!SET\_\-BINARY\_\-MODE@{SET\_\-BINARY\_\-MODE}}
\index{SET\_\-BINARY\_\-MODE@{SET\_\-BINARY\_\-MODE}!gzip.c@{gzip.c}}
\subsubsection[{SET\_\-BINARY\_\-MODE}]{\setlength{\rightskip}{0pt plus 5cm}\#define SET\_\-BINARY\_\-MODE(file)}}
\label{gzip_8c_a714fe40d73494a577de3127a79ea24a2}


\subsection{Function Documentation}
\hypertarget{gzip_8c_a88155dd6154eb1d1c59ed7809f2a0795}{
\index{gzip.c@{gzip.c}!gzip\_\-default@{gzip\_\-default}}
\index{gzip\_\-default@{gzip\_\-default}!gzip.c@{gzip.c}}
\subsubsection[{gzip\_\-default}]{\setlength{\rightskip}{0pt plus 5cm}int gzip\_\-default (int {\em argcounter}, \/  char $\ast$$\ast$ {\em argvector})}}
\label{gzip_8c_a88155dd6154eb1d1c59ed7809f2a0795}


function executed to archive a file 


\begin{DoxyParams}{Parameters}
\item[{\em argcounter}]-\/ calling arguments counter \item[{\em $\ast$$\ast$argvector}]-\/ calling arguments vector\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success or a positive int on failure 
\end{DoxyReturn}


\begin{DoxySeeAlso}{See also}
Compress from file source to file dest until EOF on source. def() returns Z\_\-OK on success, Z\_\-MEM\_\-ERROR if memory could not be allocated for processing, Z\_\-STREAM\_\-ERROR if an invalid compression level is supplied, Z\_\-VERSION\_\-ERROR if the version of zlib.h and the version of the library linked do not match, or Z\_\-ERRNO if there is an error reading or writing the files

allocate deflate state

compress until end of file

run deflate() on input until output buffer not full, finish compression if all of source has been read in

clean up and return 
\end{DoxySeeAlso}


\hypertarget{gzip_8c_a3c04138a5bfe5d72780bb7e82a18e627}{
\index{gzip.c@{gzip.c}!main@{main}}
\index{main@{main}!gzip.c@{gzip.c}}
\subsubsection[{main}]{\setlength{\rightskip}{0pt plus 5cm}int main (int {\em argc}, \/  char $\ast$$\ast$ {\em argv})}}
\label{gzip_8c_a3c04138a5bfe5d72780bb7e82a18e627}


command main function 


\begin{DoxyParams}{Parameters}
\item[{\em argc}]-\/ calling arguments counter \item[{\em $\ast$$\ast$argv}]-\/ calling arguments vector\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success or a positive int on failure 
\end{DoxyReturn}


\begin{DoxySeeAlso}{See also}
run command to archive the argv\mbox{[}1\mbox{]} file 

\hyperlink{gzip_8c_a88155dd6154eb1d1c59ed7809f2a0795}{gzip\_\-default} (argc, argv);
\end{DoxySeeAlso}


